<?php if (!defined('THINK_PATH')) exit();?> <!doctype html>
<html>
<head>
<meta charset="UTF-8"/>
<title>运营平台</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="renderer" content="webkit">
<!--<meta http-equiv="X-UA-Compatible" content="IE=edge">-->
<link type="text/css" rel="stylesheet" href="<?php echo get_style_cdnurl();?>paimai/yunying/css/common.css?v=20170207" />
<link type="text/css" rel="stylesheet" href="<?php echo get_style_cdnurl();?>paimai/yunying/css/table.css?v=20170117" />
<link type="text/css" rel="stylesheet" href="<?php echo get_style_cdnurl();?>paimai/yunying/css/jquery-ui.css" />
<script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/jquery-1.11.1.js" type="text/javascript"></script>
<script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/jquery-ui.min.js" type="text/javascript"></script>
 <script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/yunIndex.js" type="text/javascript"></script>
<script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/jquery-ym-datePlugin-0.1.js" type="text/javascript"></script>
<script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/global.js" type="text/javascript"></script>
<script src="<?php echo get_style_cdnurl();?>paimai/cheshan/js/common.js" type="text/javascript"></script>
<script type="text/javascript" src="<?php echo get_style_cdnurl();?>paimai/yunying/js/jquery.placeholder.min.js"></script>
<script type="text/javascript">
 $(function(){
     $("input").placeholder();
     if (navigator.userAgent.indexOf("Safari") > -1) {
       $("input").css("lineHeight","normal !important");
     };
});
</script>

<link type="text/css" rel="stylesheet" href="<?php echo get_style_cdnurl();?>paimai/yunying/plugin/select2/select2.css" />
<script src="<?php echo get_style_cdnurl();?>paimai/yunying/plugin/select2/select2.js" type="text/javascript"></script>
<script src="<?php echo get_style_cdnurl();?>paimai/yunying/plugin/select2/select2_locale_zh-CN.js" type="text/javascript"></script>
</head>
<body>
<div class="header">
<div class="headerCo">
<span>你好,<?php echo ($user_info["real_name"]); ?><a href="<?php echo (WEB_URL); ?>Emp/logout">退出</a></span>
<h1><img src="<?php echo get_style_cdnurl();?>paimai/yunying/images/yun_logo.jpg"></h1>
</div>
</div>
<div class="mian">
<div class="mianL">
    <dl>
        <dd>
            <a id="menu_sy" href="/Index/index" class="shouye">首页</a>
        </dd>
        <?php foreach ($tree_menu as $key => $value): ?>
          <dd>
            <span id="menu_<?php echo ($value['first_char']); ?>" ><img src="<?php echo get_style_cdnurl();?>paimai/yunying/images/yun_jia.jpg"><?php echo ($value['name']); ?></span>
            <ul style="display: none;">
                <?php if (!empty($value['children'])): ?>
                    <?php foreach ($value['children'] as $k => $v): ?>
                        <li><a id='menu_<?php echo ($v["first_char"]); ?>' href="<?php echo ($v['url']); ?>"><?php echo ($v['name']); ?></a></li>
                    <?php endforeach ?>
                <?php endif ?>
            </ul>
        <?php endforeach ?>
    </dl>
</div>

<?php $menu = 'shgl.gh'; ?>
<?php $menu=json_encode(explode('.', $menu)); ?>
<script>
    $(function () {
        var cur_menu = '<?php echo ($menu); ?>', cur_menu = eval('[' + cur_menu + ']'), cur_menu = cur_menu[0];
        if (cur_menu == "sy") {
            $("#menu_sy").removeClass('shouye').addClass('current');
        }
        $('#menu_' + cur_menu[0]).click();
        $('#menu_' + cur_menu[0]).find("img").attr("src", "http://img1.isou365.cn/paimai/yunying/images/yun_jie.jpg");
        $(".mianL").css("height", $(document).height() - 95);
        $('#menu_' + cur_menu[1]).addClass('current');
    });
</script>
<div class="mianR">
<h3 class="yonghu">过户信息</h3>
<div class="chezhu-xinxi">
    <div class="xinxi-conter xinxi-conter1" style="background: none;margin-bottom:10px;border: none">
        <h4 class="order_no">拍卖单号：<b><?php echo ($transferInfo["order_no"]); ?></b></h4>
    </div>
  <div class="transfer">
      <div class="xinxi-conter xinxi-conter1">
        <h4>车辆信息</h4>
        <ul>
            <li class="clearfix">
                <em>车型</em><em class="name-text"><?php echo ($transferInfo["model"]); ?></em>
                <em>排放标准</em><em class="dian-hua"><?php echo C('EMISSION')[$transferInfo['emission']];?></em>
            </li>

            <li class="clearfix">
                <em>初登日期</em><em class="name-text"><?php echo ($transferInfo["first_reg_date"]); ?></em>
                <em>颜色</em><em class="dian-hua"><?php echo C('CAR_COLOR')[$transferInfo['car_color']];?></em>
            </li>
            <li class="clearfix">
                <em>表显里程</em><em class="name-text"><?php echo ($transferInfo["pointer_mileage"]); ?>万公里</em>
                <em>车况级别</em><em class="name-text"><?php echo ($transferInfo["composite_state"]); echo ($transferInfo["accident_level"]); ?></em>
            </li>
            <li class="clearfix">
                <em>车辆注册地</em><em class="name-text"><?php echo ($transferInfo["reg_city"]); ?></em>
                <em>所在地</em><em class="name-text"><?php echo ($transferInfo["location_area"]); ?></em>
            </li>
            <li class="clearfix">
                <em>车牌号</em><em class="name-text"><?php echo ($transferInfo["plate"]); ?></em>
                <em>车架号</em><em class="name-text"><?php echo ($transferInfo["vin"]); ?></em>
            </li>
            <li class="clearfix">
                <em>年检有效期</em><em class="name-text"><?php echo ($transferInfo["verify_expiry"]); ?></em>
                <em>交强险有效期</em><em class="name-text"><?php echo ($transferInfo["com_insure_expiry"]); ?></em>
            </li>
            <li class="clearfix">
                <em>渠道来源</em><em class="name-text">
                    <?php if($transferInfo["comefrom"] != ''): if(empty($transferInfo['comefrom_url'])):?>
                      <?php echo $show_from[$transferInfo['comefrom']];?>
                    <?php else: ?>
                      <a href="<?php echo ($transferInfo["comefrom_url"]); ?>" target="_blank" rel="noreferrer"><?php echo $show_from[$transferInfo['comefrom']];?></a>
                    <?php endif;?>
                    <?php else: ?>
                      未知<?php endif; ?>
                </em>
                <em>最终成交价</em><em class="name-text"><?php echo ($transferInfo["last_trans_price"]); ?> 元</em>
            </li>
        </ul>
      </div>
      <br/>
      <div class="xinxi-conter xinxi-conter1">
        <h4>过户信息</h4>
        <ul>
            <li class="clearfix">
                <em>过户限制</em><em class="name-text"><?php echo ($transferInfo["transfer_limit"]); ?></em>
                <em>开票要求</em><em class="name-text"><?php echo ($transferInfo["invoice"]); ?> 元</em>
            </li>
            <li class="clearfix">
                <em>车辆落户</em>
                <em class="name-text"><?php echo ($transferInfo["transfer_to_name"]); ?></em>
                <em>过户要求</em><em class="name-text"><?php echo ($transferInfo["transfer_type"]); ?></em>
            </li>
            <li class="clearfix ">
                <em>过户截止日期</em>
                <em class="name-text supplement" style="width:827px;"><?php echo ($transferInfo["deadlinetime"]); ?></em>
            </li>
            <?php if(!empty($transferInfo['procedures_upload'])):?>
                 <li class="clearfix procedures">
                    <em class="uploadText1">手续上传要求</em><em class="name-text uploadText" style="width:827px;"><?php echo ($transferInfo["procedures_upload"]); ?></em>
                </li>
            <?php endif;?>
            <li class="clearfix ">
                <em>车辆补充说明</em>
                <em class="name-text supplement" style="width:827px;"><?php echo ($transferInfo["other_info"]); ?></em>
            </li>
        </ul>
      </div>
      <br/>
    <div class="xinxi-conter xinxi-conter1">
        <h4>复检信息</h4>
        <ul>
            <li class="clearfix">
                <em>手续复检人</em><em class="name-text"><?php echo ($transferInfo["procedures_name"]); ?></em>
                <em>车况复检人</em><em class="name-text"><?php echo ($transferInfo["check_name"]); ?> </em>
            </li>
            <li class="clearfix">
                <em>复检时间</em><em class="name-text"><?php echo ($transferInfo["recheck_time"]); ?></em>
                <em>核实手续</em><em class="name-text"><?php echo ($transferInfo["procedures"]); ?></em>
            </li>
            <li class="clearfix ">
                <em>复检备注</em>
                <em class="name-text supplement" style="width:827px;"><?php echo ($transferInfo["recheck_remark"]); ?></em>
            </li>
        </ul>
    </div>
    <br/>
      <div class="xinxi-conter xinxi-conter1">
        <h4>原车主信息</h4>
        <ul>
            <li class="clearfix">
                <em>车主类型</em><em class="name-text"><?php echo ($transferInfo["owner_type_name"]); ?></em>
                <?php if($transferInfo["owner_type"] == 1): ?><em>原车主姓名</em><em class="name-text"><?php echo ($transferInfo["seller_name"]); ?></em>
                    <?php else: ?>
                    <em>原公司名称</em><em class="dian-hua"><?php echo ($transferInfo["seller_name"]); ?></em><?php endif; ?>
            </li>
            <li class="clearfix">
                <?php if($transferInfo["owner_type"] == 1): ?><em>原联系电话</em><em class="name-text"><?php echo ($transferInfo["phone"]); ?></em>
                    <?php else: ?>
                    <em>原联系人姓名</em><em class="name-text"><?php echo ($transferInfo["contact_person"]); ?></em>
                    <em>原联系电话</em><em class="dian-hua"><?php echo ($transferInfo["phone"]); ?></em><?php endif; ?>
            </li>
            <input type="hidden" name="owner_id" value="<?php echo ($transferInfo["owner_id"]); ?>"  id="owner_id" />
        </ul>
      </div>
    <br/>
      <div class="xinxi-conter xinxi-conter1">
        <h4>评估师信息</h4>
        <ul>
            <li class="clearfix">
                <em>评估师</em><em class="name-text"><?php echo ($transferInfo["real_name"]); ?></em>
                <em>评估师电话</em><em class="dian-hua"><?php echo ($transferInfo["mobile"]); ?></em>
            </li>
            <!-- <input type="hidden" name="owner_id" value="<?php echo ($transferInfo["owner_id"]); ?>"  id="owner_id" /> -->
        </ul>
      </div>
      <br/>
      <div class="xinxi-conter xinxi-conter1">
        <h4>车商信息</h4>
        <ul>
            <li class="clearfix">
                <em>车商联系人</em><em class="name-text"><?php echo ($transferInfo["dealer_contact_person"]); ?></em>
                <em>联系人电话</em><em class="dian-hua"><?php echo ($transferInfo["dealer_contact_mobile"]); ?></em>
            </li>
        </ul>
      </div>
      <br/>
      <div class="xinxi-conter xinxi-conter1">
        <h4>备注信息</h4>
        <ul>
            <li class="clearfix">
                <em>过户备注</em><em class="name-text"><?php echo ($transferInfo["startremark"]); ?></em>
            </li>
        </ul>
      </div>
      <br/>
      <?php if (!empty($transferInfo['followLog'])): ?>
        <div class="xinxi-conter xinxi-conter1">
            <h4>过户日志</h4>
            <ul>
                <?php foreach ($transferInfo['followLog'] as $k => $f){ ?>
                <li class="clearfix">
                    <em>
                        <?php if(!empty($f['createtime'])) { ?>
                        <?php echo (date('Y-m-d H:i',strtotime($f["createtime"]))); ?>
                        <?php } ?>
                    </em>
                    <em><?php echo ($f["real_name"]); ?></em><em>继续跟踪</em>
                    <em class="name-text"><?php echo ($f["remark"]); ?></em>
                </li>
                <?php } ?>
            </ul>
        </div>
      <?php endif ?>
      
    </div>
  </div>

  <?php if($transferInfo['car_source'] == 1):?> <!-- 如果是4s店 车源时-->
    <h3 class="cha">手续上传要求</h3>
    <div class="transfer-want">
        <div class="transfer-front clearfix">
            <dl class="clearfix" style="height: 310px;">
                <dt style="height: 310px;">
                    <span style="margin-top: 134px;">过户前</span>
                </dt>
                <?php if(empty($beforeTransfer)): ?><dd class="not-upload">无上传要求</dd><?php endif; ?>
                <dd>
                    <ul >
                        <?php foreach($beforeTransfer as $pb):?>
                        <li data-id="1" class="clearfix">
                            <span><?php echo ($pb["certificate_name"]); ?></span>
                            <input type="button" class="<?php echo ($pb['certificate_image_type']==1 || $pb['certificate_image_type']==3) ? 'current' : '' ;?>" data-id="1" value="照片" >
                            <input type="button" class="<?php echo ($pb['certificate_image_type']==2 || $pb['certificate_image_type']==3) ? 'current' : '' ;?>" data-id="2" value="扫描件">
                        </li>
                        <?php endforeach;?>
                    </ul>
                </dd>
            </dl>
            <dl class="clearfix" style="margin-left:24px;">
                <dt style="height: 310px;"><span style="margin-top: 134px;">过户后</span></dt>
                <?php if(empty($afterTransfer)): ?><dd class="not-upload">无上传要求</dd><?php endif; ?>
                <dd>
                    <ul>
                        <?php foreach($afterTransfer as $pa):?>
                        <li data-id="2" class="clearfix">
                            <span><?php echo ($pa["certificate_name"]); ?></span>
                            <input type="button" class="<?php echo ($pa['certificate_image_type']==1 || $pa['certificate_image_type']==3) ? 'current' : '' ;?>" data-id="1" value="照片" >
                            <input type="button" class="<?php echo ($pa['certificate_image_type']==2 || $pa['certificate_image_type']==3) ? 'current' : '' ;?>" data-id="2" value="扫描件">
                        </li>
                        <?php endforeach;?>
                    </ul>
                </dd>
            </dl>
        </div>
    </div>
  <?php endif;?>

<h3 class="yonghu">过户结果</h3>
<div class="yuyue">
    <ul>
        <li class="yuCurrent">继续跟踪</li>
        <?php if ($transferInfo['transfer_to'] == 1): ?>
            <li>过户成功</li>
        <?php elseif($transferInfo['transfer_to'] == 2): ?>
            <li>外迁送档</li>
        <?php endif ?>
    </ul>
</div>

<div class="listBox">
    <div class="yuList">
        <div class="xuanzhe">
            <ul>
                <li class="clearfix">
                    <span class="settle-text">车辆落户</span>
                    <span class="local-text"><?php echo ($transferInfo["transfer_to_name"]); ?></span>
                    <span class="menDao" style="display:none;width:300px; text-align: left;">
                        <a href="javascript:void(0);" onclick="$('#transfer_to').val(1);" 
                        <?php if ($transferInfo['transfer_to'] == 1): ?>
                            class="menHover"
                        <?php endif ?> 
                        >本地</a>
                        <a href="javascript:void(0);" onclick="$('#transfer_to').val(2);" 
                        <?php if ($transferInfo['transfer_to'] == 2): ?>
                            class="menHover"
                        <?php endif ?> 
                        >外迁</a>
                    </span>
                    <?php if ((!isset($transferInfo['transfer_limit_id']) || $transferInfo['transfer_limit_id']==3) && $auth): ?>
                        <span class="modify-btn">修改</span>
                    <?php endif ?>
                    
                    <input type="hidden" id="transfer_to" name="transfer_to"  value="<?php echo ($transferInfo["transfer_to"]); ?>"/>
                </li>
                <li class="clearfix">
                    <span class="settle-text">过户截止日期</span>
                    <input type="text" name="deadlinetime" value="<?php echo ($transferInfo["deadlinetime"]); ?>" id="deadlinetime" class="xiaci" readonly/>
                </li>
                <li class="clearfix remarks">
                    <span class="settle-text">跟踪描述</span><textarea id="track_remark" name="remark" value=''></textarea>
                </li>
            </ul>
        </div>
        <div class="yongBtn">
            <input type="submit" value="确定" class="queding track" />
            <input class="quxiao" type="submit" value="取消" onclick="javascript:history.go(-1);location.reload();">
        </div>
    </div>
    <?php if ($transferInfo['transfer_to'] == 2): ?>
        <div class="yuList" style="display:none;">
            <div class="xuanzhe">
                <ul>
                    <li class="clearfix">
                        <span class="settle-text">预计提档日期</span>
                        <input type="text" name="mentiontime" value="请选择提档日期" id="mentiontime" class="xiaci" readonly/>
                    </li>
                    <?php if ($transferInfo['is_show_take_man'] > 0): ?>
                         <li class="clearfix">
                            <span class="settle-text">是否提车</span>
                            <input type="button" value="提车" class="put-car" />
                            <input type="hidden" id="is_take_car" value="0">
                        </li>
                        <li class="clearfix lift-truck-cont" style="height:35px;">
                            <span class="settle-text">提车人</span>
                            <em class="transfer-text">
                                   <select id="take_car_man" name="take_car_man" style="width:150px;">
                                    <option value="0" cardid="" sexid="" takenum="" mobile="">请选择提车人</option>
                                    <?php foreach($transferInfo['take_car_men'] as $k=>$man):?>
                                        <option cardid="<?php echo ($man["idcard"]); ?>" sexid="<?php echo ($man["sex"]); ?>"  takenum="<?php echo ($man["take_num"]); ?>" mobile="<?php echo ($man["mobile"]); ?>" value="<?php echo ($man["man_id"]); ?>"><?php echo ($man["real_name"]); ?></option>
                                    <?php endforeach;?>
                                    </select>
                            </em>
                        </li>
                        <li class="clearfix lift-truck" style="margin-left:107px;display: none;">
                            <span class='truck-name' style='' id = "taker_phone"><em>手机：</em></span><br/>
                            <span class='truck-name' style='' id = "taker_card"><em>身份证：</em><span></span></span><br/>
                            <span class='truck-name' style='' id = "take_car_num"><em>提车数量：</em></span>
                        </li>
                    <?php endif ?>
                    <li class="clearfix">
                        <span class="settle-text">备注</span>
                        <textarea id="mention_remark" name="remark" ></textarea>
                    </li>
                </ul>
            </div>
            <div class="yongBtn">
                <input type="submit" value="确定" class="queding mention" />
                <input class="quxiao" type="submit" value="关闭" onclick="javascript:history.go(-1);location.reload();">
            </div>
        </div>
    <?php endif ?>
    
    <?php if ($transferInfo['transfer_to'] == 1): ?>
        <div class="yuList" style="display:none;">
            <div class="xuanzhe">
                <ul>
                    <?php if ($transferInfo['is_show_take_man'] > 0): ?>
                        <li class="clearfix" style="height:35px;">
                            <span class="settle-text">提车人</span>
                            <em class="transfer-text">
                                   <select id="take_car_man1" name="take_car_man" style="width:150px;">
                                    <option value="0" cardid="" sexid="" takenum="" mobile="">请选择提车人</option>
                                    <?php foreach($transferInfo['take_car_men'] as $k=>$man):?>
                                        <option cardid="<?php echo ($man["idcard"]); ?>" sexid="<?php echo ($man["sex"]); ?>"  takenum="<?php echo ($man["take_num"]); ?>" mobile="<?php echo ($man["mobile"]); ?>" value="<?php echo ($man["man_id"]); ?>"><?php echo ($man["real_name"]); ?></option>
                                    <?php endforeach;?>
                                    </select>
                            </em>
                        </li>
                        <li class="clearfix lift-truck" style="margin-left:107px;">
                            <span class='truck-name' style='' id = "taker_phone1"><em>手机：</em></span><br/>
                            <span class='truck-name' style='' id = "taker_card1"><em>身份证：</em><span></span></span><br/>
                            <span class='truck-name' style='' id = "take_car_num1"><em>提车数量：</em></span>
                        </li>
                    <?php endif ?>
                    <li class="clearfix">
                        <span class="settle-text">备注</span>
                        <textarea id="succ_remark" name="remark" ></textarea>
                    </li>
                </ul>
            </div>
            <div class="yongBtn">
                <input type="button" value="确定" class="queding success"/>
                <input class="quxiao" type="submit" value="关闭" onclick="javascript:history.go(-1);location.reload();">
            </div>
        </div>
    <?php endif ?>
   
</div>

</div>
</body>
</html>
<script type="text/javascript">

    <!-- 手续上传要求开始-->
    var oH=$(".transfer-front dl:last-of-type").outerHeight();
    $(".transfer-front dl:first-child").css("height",oH+"px");
    $(".transfer-front dl dt").css("height",oH+"px");
    var oSh=$(".transfer-front dl dt span").height();
    $(".transfer-front dl dt span").css("marginTop",(oH-oSh)/2+"px");
    <!-- 手续上传要求结束-->


    $(".transfer_end_time").ymdateplugin({
            showTimePanel: true,
            changeMonth: true,
            changeYear: true
       });
    $("#deadlinetime").ymdateplugin({
        showTimePanel: true,
        changeMonth: true,
        changeYear: true
    });
    $("#mentiontime").ymdateplugin({
        showTimePanel: true,
        changeMonth: true,
        changeYear: true
    });   
    $(document).ready(function () {
        $(".yuList ul .transfer em").click(function () {
            $(".yuList ul .transfer em").removeClass("active");
            $("#transfer_limit").val($(this).attr('data-id'));
            $(this).addClass("active");
        })
        $(".modify-btn").on("click",function(){
            $(".menDao").show();
            $(".local-text").hide();
            // $('#transfer_to').val(1);
        })
        $("input.put-car").on("click",function(){
            $(this).toggleClass("put-car-current");
            if(!$(this).hasClass("put-car-current")){
                $(".lift-truck-cont").hide();
                $(".lift-truck").hide();
                $("#is_take_car").val(0);
            }else{
                $(".lift-truck-cont").show();
                $(".lift-truck").show();
                $("#is_take_car").val(1);
            }
            
        })
    });

    $(document).ready(function() {
        $('#take_car_man').select2();
        $('#take_car_man1').select2();
    });
    $("#take_car_man").change(function(){
        var idcard = $(this).find("option:selected").attr("cardid");
        var take_num = $(this).find("option:selected").attr("takenum");
        var mobile = $(this).find("option:selected").attr("mobile");
        $("#taker_phone").html("<em>手机：</em>"+mobile);
        $("#taker_card").html("<em>身份证：</em>"+idcard);
        $("#take_car_num").html("<em>提车数量：</em>"+take_num);
    })

    $("#take_car_man1").change(function(){
        var idcard = $(this).find("option:selected").attr("cardid");
        var take_num = $(this).find("option:selected").attr("takenum");
        var mobile = $(this).find("option:selected").attr("mobile");
        $("#taker_phone1").html("<em>手机：</em>"+mobile);
        $("#taker_card1").html("<em>身份证：</em>"+idcard);
        $("#take_car_num1").html("<em>提车数量：</em>"+take_num);
    })
    
    $(".track").click(function(){
            var transfer_id = <?php echo ($transferInfo['transfer_id']); ?>;
            var transfer_to = $("#transfer_to").val();
            var deadlinetime = $("#deadlinetime").val();
            if (deadlinetime == '' || deadlinetime < 0) {
                shibai_alert('请选择过户截止时间');
                return;
            }
            var track_remark = $("#track_remark").val();
            if (track_remark == '') {
                shibai_alert1('请填写跟踪描述');
                return;
            };
            var param = {
                'transfer_id':transfer_id,
                'transfer_to':transfer_to,
                'deadlinetime':deadlinetime,
                'track_remark':track_remark,
            };
            $(".track").attr("disabled","disabled");
            $.post("/CarTransfer/confirmTransferFollow",param,function(data){
            if(data.code!=200){
                 shibai_alert(data.msg,2000)
                 $(".track").removeAttr("disabled").removeAttr("style");
            }else{
                 btn_alert("确认成功",1500,function(){
                     location.href = '/CarTransfer/index';
                 })
             }
         },"json");
    });
    $(".mention").click(function(){
            var transfer_id = <?php echo ($transferInfo['transfer_id']); ?>;
            var mentiontime = $('#mentiontime').val();
            if (mentiontime == '请选择提档日期') {
                shibai_alert('请选择预计提档日期');
                return;
            }
            var mention_remark = $("#mention_remark").val();
            var param = {
                'transfer_id':transfer_id,
                'mentiontime':mentiontime,
                'mention_remark':mention_remark
            };
            var is_take_car = $("#is_take_car").val();
            if (is_take_car == 1) {
                var man_id = $("#take_car_man").val();
                if (man_id <= 0) {
                    shibai_alert1('请选择提车人');
                    return;
                };
                param.man_id = man_id;
                param.is_take_car = is_take_car;
            }
            $(".mention").attr("disabled","disabled");
             $.post("/CarTransfer/transferSendFile",param,function(data){
             if(data.code!=200){
                 shibai_alert(data.msg,2000)
                 $(".mention").removeAttr("disabled").removeAttr("style");
             }else{
                 btn_alert("确认成功",1500,function(){
                    location.href = '/CarTransfer/index';
                 })
             }
         },"json");
    });
    $(".success").click(function(){
            var transfer_id = <?php echo ($transferInfo['transfer_id']); ?>;
            var succ_remark = $("#succ_remark").val();      
            var is_show_take_man = <?php echo ($transferInfo['is_show_take_man']); ?>;
             var param = {
                'transfer_id':transfer_id,
                'succ_remark':succ_remark,
                'is_show_take_man':is_show_take_man
            };
            if (is_show_take_man > 0) {
                var man_id = $("#take_car_man1").val();
                if (man_id < 1) {
                    shibai_alert1('请选择提车人');
                    return;
                };
                param.man_id = man_id;
            };
            $(".success").attr("disabled","disabled");
             $.post("/carTransfer/finishTransfer",param,function(data){
             if(data.code!=200){
                 shibai_alert(data.msg,2000)
                 $(".success").removeAttr("disabled").removeAttr("style");
             }else{
                 btn_alert("确认成功",1500,function(){
                    location.href = '/CarTransfer/index';
                 })
             }
         },"json");
    });


    //提交成功
    function submit_success() {
        var order_type_new = "p_order";
        var Request = new UrlSearch(); //实例化
        var order_type = Request.order_type;
        if(order_type == '' || order_type == null){ //如果没有传 order_type ,就追加上order_type 然后返回
            location.href = document.referrer+"?order_type="+"p_order";
        }else{
            if(order_type_new == order_type){ //如果新的order_type 和 来源的order_type 一致。那么直接返回
                location.href=document.referrer;
            }else{ //否则更新成新的 order_type
                var num = document.referrer.indexOf("?")
                var url_no_parameter = document.referrer.substr(0,num);
                location.href = url_no_parameter+"?order_type="+"p_order";
            }
        }
        return;
    }
    //初始化url地址
    function UrlSearch()
    {
        var name,value;
        var str = document.referrer; //url地址
        var num = str.indexOf("?")
        str = str.substr(num+1); //取得所有参数   stringvar.substr(start [, length ]

        var arr=str.split("&"); //各个参数放到数组里
        for(var i=0;i < arr.length;i++){
            num=arr[i].indexOf("=");
            if(num>0){
                name=arr[i].substring(0,num);
                value=arr[i].substr(num+1);
                this[name]=value;
            }
        }
    }
  
</script>